@extends('admin.common.base-master')

@section('html-head')
    <link href="{{url('css/admin/pagenum.css')}}" rel="stylesheet" />

    <link rel="stylesheet" href="{{url('css/admin/jquery-ui.css')}}">
    <script type="text/javascript" src="{{url('css/admin/jquery-ui.min.js')}}"></script>
    <link href="{{url('js/lib/jquery-ui-timepicker-addon.css')}}" type="text/css" />
    <script src="{{url('js/lib/jquery-ui-timepicker-addon.js')}}" type="text/javascript"></script>
    <script src="{{url('js/lib/jquery.ui.datepicker-zh-CN.js')}}" type="text/javascript"></script>
    <script src="{{url('js/lib/jquery-ui-timepicker-zh-CN.js')}}" type="text/javascript"></script>
    <style>
        .sx{padding: 10px}
        .sx-btn{width: 64px;height: 30px;background-color: #4dbcd3;color: #fff;border: #4dbcd3;border-radius: 7%;}
    </style>
@endsection

@section('html-body')
    <!-- content start -->
    <div id="content">
        <!-- cur-position start -->
        <div id="cur-position">
            <span class="tit">当前位置：</span>
            <a href="#">活动管理</a>
            <em></em>
            <a href="#">用户参与的拼团</a>
        </div>

        @include('admin.common.activity-header')
        <!-- cur-position end -->
        <div class="table-box">
            <table class="table">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>用户昵称</th>
                    <th>用户头像</th>
                    <th>商品名称</th>
                    <th>商品图片</th>
                    <th>活动结束时间</th>
                    <th>实际拼团人数</th>
                    <th>订单编号</th>
                    <th>拼团状态</th>
                </tr>
                </thead>
                <tbody>
                @if(count($groupAddMemberList) > 0)
                    @foreach($groupAddMemberList as $a)
                        <tr id="admin_{{$a->id}}">
                            <td>{{$a->id}}</td>
                            <td>{{$a->nickname}}</td>
                            <td><img src="{{$a->photo_url}}" alt="" width="40px"></td>
                            <td>{{$a->goods_name}}</td>
                            <td><img src="{{$a->goods_thumb_url}}" alt="" width="40px"></td>
                            <td>{{$a->end_time}}</td>
                            <td>{{$a->group_num}}</td>
                            <td>{{$a->order_num}}</td>
                            <td>
                                @if($a->status == 0)
                                    <p style="color: red;">进行中</p>
                                @elseif($a->status == 1)
                                    <p style="color: #008200;">拼团成功</p>
                                @elseif($a->status == 2)
                                    <p style="color: green;">拼团失败</p>
                                @endif

                            </td>
                        </tr>
                    @endforeach
                @endif
                </tbody>
            </table>
        </div>
    </div>
    <!-- content end -->
    <script>

        $(function(){
            jQuery('#start_time').datetimepicker({
                timeFormat: "HH:mm:ss",
                dateFormat: "yy-mm-dd",
                beforeShow: function () {
                    setTimeout(
                            function () {
                                $('#ui-datepicker-div').css("z-index", 1000);
                            }, 100
                    );
                }
            });

            jQuery('#end_time').datetimepicker({
                timeFormat: "HH:mm:ss",
                dateFormat: "yy-mm-dd",
                beforeShow: function () {
                    setTimeout(
                            function () {
                                $('#ui-datepicker-div').css("z-index", 1000);
                            }, 100
                    );
                }
            });
        });
    </script>

@endsection